package com.fcscs.cservice.client.main.iguestusers;

import java.util.ArrayList;
import java.util.List;

import com.extjs.gxt.ui.client.widget.grid.ColumnConfig;
import com.fcscs.core.common.MainPaginationSearchModel;
import com.fcscs.core.gwt.common.CoreConstants;
import com.fcscs.core.gwt.common.CoreEnums.SubmitType;
import com.fcscs.core.gwt.common.CoreUtil;
import com.fcscs.core.gwt.common.FormSubmitListener;
import com.fcscs.core.gwt.common.SearchExecutor;
import com.fcscs.core.gwt.common.ui.FcsFormPanel;
import com.fcscs.core.gwt.common.ui.PagingSearchResultsPanel;
import com.fcscs.core.gwt.common.ui.PagingSearchResultsPanel.ModelSelectListener;
import com.fcscs.cservice.client.common.CServiceConstants;
import com.fcscs.cservice.client.common.model.restaurants.BookingViewModelData;
import com.fcscs.cservice.domain.model.BookingUpdate;
import com.fcscs.share.gwt.common.ShareGWTConstants;

public class iGuestUsersHistoryGrid extends
		PagingSearchResultsPanel<BookingViewModelData, MainPaginationSearchModel> implements
		FormSubmitListener<BookingUpdate>, ModelSelectListener<BookingViewModelData> {

	public iGuestUsersHistoryGrid(String title,
			SearchExecutor<BookingViewModelData, MainPaginationSearchModel> exe) {
		super(title, exe, (Object[]) null);
		setSize(740, 180);
	}

	@Override
	public void onModelClick(BookingViewModelData model) {

	}

	@Override
	public void onModelDoubleClick(BookingViewModelData model) {

	}

	@Override
	public void onModelEnterPress(BookingViewModelData model) {

	}

	@Override
	public void formSubmitCallBack(FcsFormPanel<BookingUpdate> form, SubmitType submitType) {

	}

	@Override
	protected List<ColumnConfig> getColumnConfig(Object... params) {
		List<ColumnConfig> columns = new ArrayList<ColumnConfig>();

		ColumnConfig cc = CoreUtil.createNonSortableColumnConf(ShareGWTConstants.DATE,
				CServiceConstants.CSERVICE_CONSTANTS.dateTime(), 120);
		columns.add(cc);

		columns.add(CoreUtil.createNonSortableColumnConf(CServiceConstants.CATEGORY,
				CServiceConstants.CSERVICE_CONSTANTS.category(), 140));
		columns.add(CoreUtil.createNonSortableColumnConf(CServiceConstants.PAX,
				CoreConstants.CORE_CONSTANTS.total(), 120));
		columns.add(CoreUtil.createNonSortableColumnConf(CServiceConstants.ACTIVITYLOGS,
				CoreConstants.CORE_CONSTANTS.notes(), 140));
		columns.add(CoreUtil.createNonSortableColumnConf(CServiceConstants.STATUS,
				CoreConstants.CORE_CONSTANTS.status(), 80));
		columns.add(CoreUtil.createNonSortableColumnConf(CServiceConstants.CONTACT,
				CoreConstants.CORE_CONSTANTS.contact(), 115));
		return columns;
	}

}
